<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\EnergyCome;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Cache;

class EnergyComeController extends Controller
{


    public function index(Request $request){
        return view('admin/energy/index');
    }

    public function getPageRows(Request $request){
    	$page = intval($request->input('page',1));

        $query = EnergyCome::with('user')->where('status',2)->orderBy('id','DESC');
        $rows   =  $query->paginate(15);
        $data = [
            'rows'=>$rows,
        ];
        return $this->response($data);
    }
}
